<template>
  <el-card>
    <div class="box">
      <img :src="userStore.avatar" alt="" class="avatar" />
      <div class="bottom">
        <h3 class="title">{{ getTime() }}好啊{{ userStore.username }}</h3>
        <p class="subtitle">{{ logo.logoName }}</p>
      </div>
    </div>
  </el-card>
  <div class="logo">
    <svg-icon name="welcome" width="600px" height="600px"></svg-icon>
  </div>
</template>

<script setup lang="ts">
//引入用户相关的仓库，获取用户头像和名称
import useUserStore from '@/store/modules/user'
import logo from '@/settings/index'
import { getTime } from '@/utils/time'
//获取用户仓库
let userStore = useUserStore()
</script>

<style scoped lang="scss">
.box {
  display: flex;
  .avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
  }
  .bottom {
    margin-left: 20px;
    .title {
      font-weight: bold;
      font-size: 30px;
      margin-top: 20px;
      margin-bottom: 15px;
    }
    .subtitle {
      font-style: italic;
      color: gray;
    }
  }
}
.logo {
  display: flex;
  justify-content: center;
  align-content: center;
}
</style>
